import request from "@/utils/request.js";


export function downloadOssFile(data) {
    return request.post('/oss-file/download', data,{responseType: 'blob'})
}

export function downloadOssCount(data) {
    return request.post('/oss-file/count', data)
}

export function uploadOssFile(content) {
    let dataForm = new FormData();
    dataForm.append('fileBuffer', content.fileBuffer);
    dataForm.append('fileName', content.fileName);
    dataForm.append('type', content.type);
    dataForm.append('user', content.user)
    return request.post('/oss-file/upload', dataForm)
}